package com.ruoyi.graduate.domain.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@ApiModel("轮播图分页查询参数类")
public class MsCarouselPageVo {

    @ApiModelProperty(value = "轮播图唯一标识（自增主键）")
    @TableId(type = IdType.AUTO) // 对应数据库AUTO_INCREMENT自增主键
    private Integer carouselId;

    @ApiModelProperty(value = "轮播图路径（必填字段，《毕设.doc》核心字段）")
    private String image;

    @ApiModelProperty(value = "轮播图标题（必填字段，《毕设.doc》核心字段）")
    private String name;

    @ApiModelProperty(value = "是否启用（0=禁用，1=启用，默认1，《毕设.doc》状态字段）")
    private Integer isEnabled;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT) // 插入时自动填充
    private LocalDateTime createTime;
}
